package cn.kgc.ssm.controller;

import cn.kgc.ssm.entity.Role;
import cn.kgc.ssm.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author: mosin
 * @version: v1.0  2022/7/11
 */
@Controller
@RequestMapping("role")
public class RoleController {
    @Autowired
    private RoleService roleService;
    @RequestMapping("all")
    @ResponseBody
    public List<Role> findAll(){

         return roleService.selectAll();

    }


}
